package com.zfzs.post.modules.transaction.service;

import com.zfzs.post.modules.transaction.domain.BenefitInfo;
import com.zfzs.post.modules.transaction.service.dto.BenefitInfoQueryCriteria;
//import org.springframework.cache.annotation.CacheConfig;
//import org.springframework.cache.annotation.CacheEvict;
//import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
* @author wq
* @date 2019-10-23
*/
//@CacheConfig(cacheNames = "benefitInfo")
public interface BenefitInfoService {

    /**
    * queryAll 分页
    * @param criteria
    * @param pageable
    * @return
    */
    //@Cacheable(keyGenerator = "keyGenerator")
    Object queryAll(BenefitInfoQueryCriteria criteria, Pageable pageable);

    /**
    * queryAll 不分页
    * @param criteria
    * @return
    */
    //@Cacheable(keyGenerator = "keyGenerator")
    public Object queryAll(BenefitInfoQueryCriteria criteria);

    /**
     * findById
     * @param benefitInfoId
     * @return
     */
    //@Cacheable(key = "#p0")
    BenefitInfo findById(Long benefitInfoId);

    /**
     * create
     * @param resources
     * @return
     */
    //@CacheEvict(allEntries = true)
    BenefitInfo create(BenefitInfo resources);

    /**
     * update
     * @param resources
     */
    //@CacheEvict(allEntries = true)
    void update(BenefitInfo resources);

    /**
     * delete
     * @param benefitInfoId
     */
    //@CacheEvict(allEntries = true)
    void delete(Long benefitInfoId);

    /**
     * 根据id和类型查询单个
     * @param benefitId
     * @param terminalTypeId
     * @return
     */
    BenefitInfo findByBenefitId(Long benefitId, Long terminalTypeId);

    /**
     * 分润id查询列表
     * @param benefitId
     * @return
     */
    List<BenefitInfo> findByBenefitId(Long benefitId);
}